{include file='public/header.html'}

<div class="container mtn">

  <div class="panel panel-default">
    <div class="panel-heading">修改文集<span class="pull-right"><a href="javascript:history.back(-1);">返回</a></span></div>
    <div class="panel-body">
      <form class="form-horizontal submit-ajax" role="form" action="{:url('edit')}" method="post">
        <input type="hidden" name="id" value="{$vo.id}" />

        <div class="form-group">
          <label for="title" class="col-sm-1 control-label">*标题</label>
          <div class="col-sm-11">
            <input type="text" id="title" name="title" class="form-control" placeholder="请输入文集名称" value="{$vo.title}" />
          </div>
        </div>
        <div class="form-group">
          <label for="sign" class="col-sm-1 control-label">*标识</label>
          <div class="col-sm-11">
            <input type="text" id="sign" name="sign" class="form-control" placeholder="标识名称(英文)" value="{$vo.sign}" />
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label">封面</label>
          <div class="col-sm-11">
            {php $attr=pic_attr($vo['thumb'])}
            <input type="hidden" id="thumb" name="thumb" value="{$vo.thumb}" />
            <div id="pic_box" class="thumb">
              <img id="pic_img" {$attr.img} width="90" height="60" alt="thumb" />上传封面
              <span id="pic_remove" {$attr.span}>删除</span>
              <input id="upload-input" type="file" accept="image/*" onchange="previewImg(this);">
            </div>
          </div>
        </div>
        <div class="form-group">
          <label for="summary" class="col-sm-1 control-label">*简介</label>
          <div class="col-sm-11">
            <textarea name="summary" id="summary" rows="2" class="form-control" placeholder="请输入文档简介">{$vo.summary}</textarea>
          </div>
        </div>
        <div class="form-group">
          <label for="sort" class="col-sm-1 control-label">*排序</label>
          <div class="col-sm-11">
            <input type="text" id="sort" name="sort" class="form-control" style="width:auto;" placeholder="请输入排序值" value="{$vo.sort}" />
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label">*类型</label>
          <div class="col-sm-11">
            {:form_select('is_public', ['私有', '公开'], $vo['is_public'], ' class="form-control" style="width:200px;"')}
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label">*状态</label>
          <div class="col-sm-11">
            {:form_select('status', ['停用', '启用'], $vo['status'], ' class="form-control" style="width:200px;"')}
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label">&nbsp;</label>
          <div class="col-sm-11">
            <input type="submit" id="submit" value="修改" class="btn btn-primary" />
          </div>
        </div>
      </form>
    </div>
  </div>


</div>

{include file='public/footer.html'}
<script>
  const GV = {
    upload_api: "{:url('api/upload')}",
    pic_upload_api: "{:url('api/upload_base64')}",
    pic_del_api: "{:url('api/image_del')}",
  }
</script>
<script src="__STATIC__/js/pic_upload.js?v={:site_ver()}"></script>
</body>
</html>